﻿<?
	include("seguranca.php"); // Inclui o arquivo com o sistema de segurança
	protegePagina(); // Chama a função que protege a página
	if($_SESSION['nivel'] != 'administrador'){ //Se não for ADM desloga o usuário e expulsa da página
		expulsaVisitante();
	}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Cadastrar Administrador</title>
    <script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryValidationPassword.js" type="text/javascript"></script>
    <link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <link href="../SpryAssets/SpryValidationPassword.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="css/bootstrap.css" />
</head>

<body>
    <div class="container">
    
    <header class="masthead">
    <h1 class="muted" align="center">Cadastrar Administrador</h1>
        
    <form id="form1" name="form1" method="post" action="cadastroAdm.php" autocomplete="on">
    
        <span id="sprytextfield1">
        <label for="nome">Nome:</label>
        <input type="text" name="nome" id="nome" />
        <span class="textfieldRequiredMsg">O campo é obrigatório</span></h4>
        </span>
        
        <p><span id="sprytextfield2">
        <label for="usuario">Nome de Usuário:</label>
        <input type="text" name="usuario" id="usuario" />
        <span class="textfieldRequiredMsg">O campo é obrigatório</span></span>
        </p>
        
        <p><span id="sprypassword1">
        <label for="senha">Senha:</label>
        <input type="password" name="senha" id="senha" />
        <span class="passwordRequiredMsg">O campo é obrigatório</span></span></p>
        
        <p><span id="sprytextfield4">
        <label for="email">Email:</label>
        <input type="text" name="email" id="email" />
        <span class="textfieldRequiredMsg">O campo é obrigatório</span><span class="textfieldInvalidFormatMsg">Formato inválido.</span></span></p>
        
        <p><span id="sprytextfield3">
        <label for="fone">Telefone:</label>
        <input type="text" name="fone" id="fone" />
        <span class="textfieldRequiredMsg">O campo é obrigatório</span><span class="textfieldInvalidFormatMsg">Formato inválido.</span></span></p>
        
        <p>
        <input type="submit" name="enviar" class="btn btn-primary" value="Enviar">	
        </p>
    
    </form>
    <p>&nbsp; </p>
</body>

<script type="text/javascript">
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "email");
var sprypassword1 = new Spry.Widget.ValidationPassword("sprypassword1");
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "custom", {useCharacterMasking:true, pattern:"(00) 0000-0000"});
</script>

</html>
